//
//  UploadViewController.h
//  VmixMobileDemo
//
//  Created by jeffs on 7/21/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ASIFormDataRequest.h"


@interface UploadViewController : UIViewController < UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIActionSheetDelegate >{
	
	IBOutlet UIView * uploadForm;
	IBOutlet UIView * uploadProgress;
	IBOutlet UIView * uploadComplete;
	IBOutlet UIProgressView *progressBar;
	IBOutlet UIButton * selectFileBtn;
	IBOutlet UIButton * uploadFileBtn;
	IBOutlet UITextField * authorText;
	IBOutlet UITextField * titleText;
	IBOutlet UINavigationBar * titleBar;
	
	IBOutlet UIImageView * selectedFileThumb;
	IBOutlet UILabel * selectedFilePath;

	ASIFormDataRequest *request;
	NSURL * fileURL;
	
	UIImagePickerController* imagePickerController;
	NSArray *availableTypes;
	BOOL filePicked;
	
}

@property (nonatomic, retain) UIView * uploadForm;
@property (nonatomic, retain) UIView * uploadProgress;
@property (nonatomic, retain) UIView * uploadComplete;
@property (nonatomic, retain) UIProgressView *progressBar;
@property (nonatomic, retain) UIButton * selectFileBtn;
@property (nonatomic, retain) UIButton * uploadFileBtn;
@property (nonatomic, retain) UITextField * authorText;
@property (nonatomic, retain) UITextField * titleText;
@property (nonatomic, retain) UINavigationBar * titleBar;
@property (nonatomic, retain) UILabel * selectedFilePath;
@property (nonatomic, retain) UIImageView * selectedFileThumb;

@property (retain, nonatomic) ASIFormDataRequest *request;
@property (retain, nonatomic) NSURL * fileURL;
@property (retain, nonatomic) UIImagePickerController* imagePickerController;
@property (retain, nonatomic) NSArray *availableTypes;
@property BOOL filePicked;

- (IBAction) performUpload:(id)sender;
- (IBAction) selectFile:(id)sender;
- (IBAction) resetUpload:(id)sender;

@end
